a = [1, 2]
b = [3, 4]
print(a + b)


def max_interval_intersec(s):
    best = ([(left, +1) for left, right in s] +
            [(right, -1) for left, right in s])
    print(best)
    best.sort()
    print(best)
    c = 0
    best2 = (c, None)
    for x, d in best:
        c += d
        # print(best2[0])
        if best2[0] < c:
            print('c --- ' + str(c))
            best2 = (c, x)
    return best2


s = [(1, 4), (5, 6), (2, 99)]
b = [(left, +1) for left, right in s]
print(b)
rs = max_interval_intersec(s)
print(rs[0])
